package com.mianyang.zhangsan.model.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.mianyang.zhangsan.model.entity.SecAnswer;
import com.mianyang.zhangsan.model.entity.SecProblem;
import lombok.Data;

import java.util.List;

@Data
public class SecProblemAnswerDto {
    /**
     * 问题编号
     */
    @TableId(type = IdType.AUTO)
    private Long problemId;

    /**
     * 问题描述
     */
    private String problemDesc;

    /**
     * 问题类型
     */
    private Integer problemType;

    /**
     * 正确答案
     */
    private Long problemRight;

    /**
     * 问题解析
     */
    private String analysis;

    /**
     * 题库编号
     */
    private Long bankId;

    /**
     * 题库名称
     */
    private String bankName;

    public SecProblem getProblem() {
        SecProblem problem = new SecProblem();
        problem.setProblemId(problemId);
        problem.setProblemDesc(problemDesc);
        problem.setProblemType(problemType);
        problem.setProblemRight(problemRight);
        problem.setAnalysis(analysis);
        problem.setBankId(bankId);
        problem.setBankName(bankName);
        return problem;
    }

    private List<SecAnswer> answers;
}
